package com.neuedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.neuedu.entity.Wyfile;
import com.neuedu.mapper.WyfileMapper;
import com.neuedu.service.WyfileService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 文件表 服务实现类
 * </p>
 *
 * @author LiYang
 * @since 2024-11-08
 */
@Service
public class WyfileServiceImpl extends ServiceImpl<WyfileMapper, Wyfile> implements WyfileService {

    @Override
    public Wyfile get(String md5, Long size, String type) {
        QueryWrapper<Wyfile> wrapper = new QueryWrapper<>();
        wrapper.eq("md5", md5)
                .eq("size", size)
                .eq("type", type);
        return this.getOne(wrapper);
    }
}
